
from django import forms

from zanhu02.articles.models import Articles
from markdownx.fields import MarkdownxFormField

class ArticleForm(forms.ModelForm):
    content = MarkdownxFormField()
    status = forms.CharField(widget=forms.HiddenInput())  # 对用户不可见
    edited = forms.BooleanField(widget=forms.HiddenInput(),initial=False,required=False)
    class Meta:
        model = Articles
        fields = ['title','content','images','tags',"status","edited"]